package com.example.computer_exam_training_sys.mapper;

import com.example.computer_exam_training_sys.entity.Knowledge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface KnowledgeMapper {

    @Select("SELECT point_id AS id, course_id AS courseId, point_name AS label, " +
            "level AS status, description, create_time AS createTime, parent_point_id AS parentId " +
            "FROM knowledge_points1 WHERE course_id = #{courseId}")
    List<Knowledge> getKnowledgeByCourseId(@Param("courseId") Long courseId);
}
